package boxe.timer;

/**
 * A mode is acontaine of run and has a name and a number of round/loop
 * 
 * @author Julien Perriard
 * @date 25.05.2010
 *
 */

import java.util.ArrayList;
import java.util.List;

public class Mode {
	
	/*
	 * name of the mode
	 */
	private String name;
	
	/*
	 * Number of round
	 */
	private int nbRound;
	
	/*
	 * a list of run element
	 */
	private List<RunPack> listRunPack;
	
	/**
	 * Constructor
	 */
	public Mode() {
		listRunPack = new ArrayList<RunPack>();
	}
	
	/**
	 * Constructor
	 * @param name
	 * @param round
	 */
	public Mode(String name, int round) {
		listRunPack = new ArrayList<RunPack>();
		this.name = name;
		this.nbRound = round;
	}
	
	/**
	 * Getter for name
	 * @return
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Setter for name
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * Getter for list run
	 * 
	 * @return
	 */
	public List<RunPack> getListRunPack() {
		return listRunPack;
	}
	
	/**
	 * Setter for list runs
	 * 
	 * @param listRun
	 */
	public void setListRunPack(List<RunPack> listRun) {
		this.listRunPack = listRun;
	}
	
	/**
	 * Return the number of runs
	 * @return
	 */
	public int getsize() {
		return getListRunPack().size();
	}

	/**
	 * Getter number of round
	 * 
	 * @return
	 */
	public int getNbRound() {
		return nbRound;
	}

	/**
	 * Setter number of round
	 * 
	 * @param nbRound
	 */
	public void setNbRound(int nbRound) {
		this.nbRound = nbRound;
	}
}
